ghacks-clear-FF68inclusive-[deprecated].js 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. /***
  2. This will reset the preferences that have been deprecated by Mozilla
  3. and used in the ghacks user.js up to and including Firefox/ESR 68
  4. It is in reverse order, so feel free to remove sections that do not apply
  5. For instructions see:
  6. https://github.com/ghacksuserjs/ghacks-user.js/wiki/3.1-Resetting-Inactive-Prefs-[Scripts]
  7. ***/
  8. (function() {
  9. let ops = [
  10. /* deprecated */
  11. /* 68 */
  12. 'browser.newtabpage.activity-stream.disableSnippets',
  13. 'browser.aboutHomeSnippets.updateUrl',
  14. 'lightweightThemes.update.enabled',
  15. 'security.csp.experimentalEnabled',
  16. /* F67 */
  17. 'dom.event.highrestimestamp.enabled',
  18. 'browser.newtabpage.activity-stream.asrouter.userprefs.cfr',
  19. /* 66 */
  20. 'browser.chrome.errorReporter.enabled',
  21. 'browser.chrome.errorReporter.submitUrl',
  22. 'network.allow-experiments',
  23. /* 65 */
  24. 'browser.urlbar.autocomplete.enabled',
  25. 'browser.fixup.hide_user_pass',
  26. /* 64 */
  27. 'browser.onboarding.enabled',
  28. 'devtools.webide.autoinstallADBHelper',
  29. 'devtools.webide.adbAddonURL',
  30. 'security.csp.enable_violation_events',
  31. /* 63 */
  32. 'browser.search.countryCode',
  33. 'app.update.enabled',
  34. 'shield.savant.enabled',
  35. 'browser.chrome.favicons',
  36. 'media.autoplay.enabled',
  37. 'network.cookie.lifetime.days',
  38. 'browser.ctrlTab.previews',
  39. /* 62 */
  40. 'plugin.state.java',
  41. /* 61 */
  42. 'experiments.enabled',
  43. 'experiments.manifest.uri',
  44. 'experiments.supported',
  45. 'experiments.activeExperiment',
  46. 'network.jar.block-remote-files',
  47. 'network.jar.open-unsafe-types',
  48. /* 60 */
  49. 'browser.newtabpage.directory.source',
  50. 'browser.newtabpage.enhanced',
  51. 'browser.newtabpage.introShown',
  52. 'extensions.shield-recipe-client.enabled',
  53. 'extensions.shield-recipe-client.api_url',
  54. 'browser.newtabpage.activity-stream.enabled',
  55. 'dom.workers.enabled',
  56. /* 59 */
  57. 'intl.locale.matchOS',
  58. 'general.useragent.locale',
  59. 'datareporting.healthreport.about.reportUrl',
  60. 'dom.flyweb.enabled',
  61. 'security.mixed_content.use_hsts',
  62. 'security.mixed_content.send_hsts_priming',
  63. 'network.http.referer.userControlPolicy',
  64. 'security.xpconnect.plugin.unrestricted',
  65. 'media.getusermedia.screensharing.allowed_domains',
  66. 'camera.control.face_detection.enabled',
  67. 'dom.disable_window_status_change',
  68. 'dom.idle-observers-api.enabled',
  69. /* 58 */
  70. 'browser.crashReports.unsubmittedCheck.autoSubmit',
  71. /* 57 */
  72. 'social.whitelist',
  73. 'social.toast-notifications.enabled',
  74. 'social.shareDirectory',
  75. 'social.remote-install.enabled',
  76. 'social.directories',
  77. 'social.share.activationPanelEnabled',
  78. 'social.enabled',
  79. 'media.eme.chromium-api.enabled',
  80. 'devtools.webide.autoinstallFxdtAdapters',
  81. 'browser.casting.enabled',
  82. 'browser.bookmarks.showRecentlyBookmarked',
  83. /* 56 */
  84. 'extensions.screenshots.system-disabled',
  85. 'extensions.formautofill.experimental',
  86. /* 55 */
  87. 'geo.security.allowinsecure',
  88. 'browser.selfsupport.enabled',
  89. 'browser.selfsupport.url',
  90. 'browser.newtabpage.directory.ping',
  91. 'browser.formfill.saveHttpsForms',
  92. 'browser.formautofill.enabled',
  93. 'dom.enable_user_timing',
  94. 'dom.keyboardevent.code.enabled',
  95. 'browser.tabs.animate',
  96. 'browser.fullscreen.animate',
  97. /* 54 */
  98. 'browser.safebrowsing.reportMalwareMistakeURL',
  99. 'browser.safebrowsing.reportPhishMistakeURL',
  100. 'media.eme.apiVisible',
  101. 'dom.archivereader.enabled',
  102. /* 53 */
  103. 'security.tls.unrestricted_rc4_fallback',
  104. 'plugin.scan.Acrobat',
  105. 'plugin.scan.Quicktime',
  106. 'plugin.scan.WindowsMediaPlayer',
  107. 'media.getusermedia.screensharing.allow_on_old_platforms',
  108. 'dom.beforeAfterKeyboardEvent.enabled',
  109. /* 52 */
  110. 'network.http.sendSecureXSiteReferrer',
  111. 'media.gmp-eme-adobe.enabled',
  112. 'media.gmp-eme-adobe.visible',
  113. 'media.gmp-eme-adobe.autoupdate',
  114. 'dom.telephony.enabled',
  115. 'dom.battery.enabled',
  116. /* 51 */
  117. 'media.block-play-until-visible',
  118. 'dom.vr.oculus050.enabled',
  119. 'network.http.spdy.enabled.v3-1',
  120. /* 50 */
  121. 'browser.usedOnWindows10.introURL',
  122. 'plugins.update.notifyUser',
  123. 'browser.safebrowsing.enabled',
  124. 'security.ssl3.ecdhe_ecdsa_rc4_128_sha',
  125. 'security.ssl3.ecdhe_rsa_rc4_128_sha',
  126. 'security.ssl3.rsa_rc4_128_md5',
  127. 'security.ssl3.rsa_rc4_128_sha',
  128. 'plugins.update.url',
  129. /* 49 */
  130. 'loop.enabled',
  131. 'loop.server',
  132. 'loop.feedback.formURL',
  133. 'loop.feedback.manualFormURL',
  134. 'loop.facebook.appId',
  135. 'loop.facebook.enabled',
  136. 'loop.facebook.fallbackUrl',
  137. 'loop.facebook.shareUrl',
  138. 'loop.logDomains',
  139. 'dom.disable_window_open_feature.scrollbars',
  140. 'dom.push.udp.wakeupEnabled',
  141. /* 48 */
  142. 'browser.urlbar.unifiedcomplete',
  143. /* 47 */
  144. 'toolkit.telemetry.unifiedIsOptIn',
  145. 'datareporting.healthreport.about.reportUrlUnified',
  146. 'browser.history.allowPopState',
  147. 'browser.history.allowPushState',
  148. 'browser.history.allowReplaceState',
  149. /* 46 */
  150. 'datareporting.healthreport.service.enabled',
  151. 'datareporting.healthreport.documentServerURI',
  152. 'datareporting.policy.dataSubmissionEnabled.v2',
  153. 'browser.safebrowsing.appRepURL',
  154. 'browser.polaris.enabled',
  155. 'browser.pocket.enabled',
  156. 'browser.pocket.api',
  157. 'browser.pocket.site',
  158. 'browser.pocket.oAuthConsumerKey',
  159. /* 45 */
  160. 'browser.sessionstore.privacy_level_deferred',
  161. /* 44 */
  162. 'browser.safebrowsing.provider.google.appRepURL',
  163. 'security.tls.insecure_fallback_hosts.use_static_list',
  164. 'dom.workers.sharedWorkers.enabled',
  165. 'dom.disable_image_src_set',
  166. /* 43 */
  167. 'browser.safebrowsing.gethashURL',
  168. 'browser.safebrowsing.updateURL',
  169. 'browser.safebrowsing.malware.reportURL',
  170. 'browser.trackingprotection.gethashURL',
  171. 'browser.trackingprotection.updateURL',
  172. 'pfs.datasource.url',
  173. 'browser.search.showOneOffButtons',
  174. /* 42 and earlier */
  175. 'privacy.clearOnShutdown.passwords', // 42
  176. 'full-screen-api.approval-required', // 42
  177. 'browser.safebrowsing.reportErrorURL', // 41
  178. 'browser.safebrowsing.reportGenericURL', // 41
  179. 'browser.safebrowsing.reportMalwareErrorURL', // 41
  180. 'browser.safebrowsing.reportMalwareURL', // 41
  181. 'browser.safebrowsing.reportURL', // 41
  182. 'plugins.enumerable_names', // 41
  183. 'network.http.spdy.enabled.http2draft', // 41
  184. 'camera.control.autofocus_moving_callback.enabled', // 37
  185. 'privacy.donottrackheader.value', // 36
  186. 'network.websocket.enabled', // 35
  187. 'dom.network.enabled', // 31
  188. 'pageThumbs.enabled', // 25
  189. /* reset parrot: check your open about:config after running the script */
  190. '_user.js.parrot'
  191. ]
  192. if("undefined" === typeof(Services)) {
  193. alert("about:config needs to be the active tab!");
  194. return;
  195. }
  196. let c = 0;
  197. for (let i = 0, len = ops.length; i < len; i++) {
  198. if (Services.prefs.prefHasUserValue(ops[i])) {
  199. Services.prefs.clearUserPref(ops[i]);
  200. if (!Services.prefs.prefHasUserValue(ops[i])) {
  201. console.log("reset", ops[i]);
  202. c++;
  203. } else { console.log("failed to reset", ops[i]); }
  204. }
  205. }
  206. focus();
  207. let d = (c==1) ? " pref" : " prefs";
  208. if (c > 0) {
  209. alert("successfully reset " + c + d + "\n\nfor details check the Browser Console (Ctrl+Shift+J)");
  210. } else { alert("nothing to reset"); }
  211. })();